package com.dy.design_pattern_study.flyweight_pattern.dome3.impl;

import com.dy.design_pattern_study.flyweight_pattern.dome3.User;
import com.dy.design_pattern_study.flyweight_pattern.dome3.WebSite;
import com.dy.design_pattern_study.utils.Utils;

/**
 * @CreateBy zhangdingyi
 * @Date 2023-04-23
 * @Content 具体的网站类 -不可共享
 */
public class UnsharedConcreteWebSite extends WebSite {

    private String name;

    public UnsharedConcreteWebSite(String name) {
        this.name = name;
    }

    @Override
    public void use(User user) {
        System.out.println("不共享的网站----");
        System.out.println("网站分类：" + name);
        System.out.println("用户名称：" + user.getName());
        System.out.println("类地址：" + Utils.getAddress(this));
        System.out.println("----------------------");
    }
}
